/**
 * oled屏幕的驱动
 * 
 * 主要用于调试、人机交互等用途。
 * 
 * 方便起见，字体（fonts）也直接放在这个库里面。
 */
#ifndef OLED_H
#define OLED_H

#include <stdint.h>
#include "i2c.h"


#define DELETE 0x7F
#define HORIZ_LINE 0x80
#define VERTICAL_LINE 0x81

extern const unsigned char F6x8[][6];
extern const unsigned char F8X16[][16];

extern I2C_HandleTypeDef  hi2c1;
uint8_t  Oled_Init(void);
void Oled_Turn(void);
void Oled_ClearAll(void);
void Oled_IntensityControl(uint8_t intensity);
void Oled_ShowCharSmall(uint8_t x, uint8_t y, uint8_t chr);
void Oled_ShowCharBig(uint8_t x, uint8_t y, uint8_t chr);
void Oled_ShowStringSmall(uint8_t x, uint8_t y, const char *chr);
void Oled_ShowStringBig(uint8_t x, uint8_t y, const char *chr);
void Oled_ShowNumSmall(uint8_t x, uint8_t y, int16_t num, uint8_t len);
void Oled_DrawBMP(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t *  BMP);


#endif
